GtkCellRendererPixbuf: Set force_scale_pixbuf
authorMatthias Clasen <mclasen@redhat.com>
Fri, 20 Jun 2014 22:34:06 +0000 (18:34 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 22 Jun 2014 15:52:11 +0000 (11:52 -0400)
The recent icon theme scaling changes make the code more
sensitive to mis-sized icons (e.g. application icons in
the app chooser). A single row whose size gets blown out
of proportion by a big icon is never wanted in a list.
We can avoid this situation by telling GtkIconHelper to
force-scale the pixbuf to the requested size.

gtk/gtkcellrendererpixbuf.c

index 2271457d7f6f572448153987fad840f6bf9fdba5..15e4a0d6e5e9b15ecee1f1b4895b608c0d2a8222 100644 (file)
@@ -109,6 +109,7 @@ gtk_cell_renderer_pixbuf_init (GtkCellRendererPixbuf *cellpixbuf)
   priv = cellpixbuf->priv;
 
   priv->icon_helper = _gtk_icon_helper_new ();
+  _gtk_icon_helper_set_force_scale_pixbuf (priv->icon_helper, TRUE);
   priv->icon_size = GTK_ICON_SIZE_MENU;
 }